package com.by.controller;


import com.by.bean.ResultBean;
import com.by.entity.Order;
import com.by.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class OrderController  extends BaseController{


    @Autowired
    OrderService orderService;

    @GetMapping("/order")
    public ResultBean getOrder(int id) {
        Order order = orderService.getById(id);
        return success("获取成功", order);
}
}
